<template>
	<view style="background: #F8F9F9;min-height: 100vh;width: 750rpx;display: inline-block;">

		<view style="padding: 20rpx; width: 700rpx;margin: 40rpx auto;background: #fff;border-radius: 20rpx;">

			<u-parse :html="content"></u-parse>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				title: '',
				content: ''
			}
		},
	onLoad(options) {
		
		
		if(options.id){
		  this.detail(options.id)
		}
		
	},
		methods: {
			detail(id) {
				this.$u.post('/index/newsDetail', {
					id: id
				}).then(res => {
					this.content = res.detail;
					uni.setNavigationBarTitle({
						title: res.title
					})
				}).catch(err => {})
			}
		},
		
	}
</script>

<style>
</style>
